package com.future.allUtils.constants;

import java.util.concurrent.ThreadLocalRandom;

/**
 * <p>
 * RedisConstants
 * </p>
 *
 * @author han
 * @since 2025/7/21
 */
/*
* Redis键 常量类
* */
public class RedisConstants {
    public static final String LOGIN_CODE_KEY = "login:code:";
    public static final Long LOGIN_CODE_TTL = 2L;
    public static final String LOGIN_USER_KEY = "login:token:";
    public static final Long LOGIN_USER_TTL = 30L;
    /**
     * 问卷缓存键名前缀
     */
    public static  final String OPTION_SCORE_KEY = "option:score:";
    public static final String USER_QUESTIONNAIRE_KEY = "user:questionnaire:";
    /**
     *  链接访问前缀
     */
    public static  final String HTTP_URL="http://";


//解决缓存雪崩:缓存空值
    public static final Long CACHE_NULL_TTL = 2L;
    public static final Long CACHE_NULL_TTL_RANDOM = CACHE_NULL_TTL + ThreadLocalRandom.current().nextLong(1,4);



}
